package com.gdwhomework.chapter07.homework006;

public class HomeWork006 {
    public static void main(String[] args) {
        Person parr[] = new Person[4];
        parr[0] = new Student("小刘",'男',19,0000001);
        parr[1] = new Student("小张",'女',16,0000002);
        parr[2] = new Teacher("刘老师",'女',50,30);
        parr[3] = new Teacher("张齐",'男',45,20);
        Tools tools = new Tools();
        tools.person_sort(parr);
        for (int i = 0; i < parr.length; i++) {
            parr[i].showinfo();
            tools.say(parr[i]);
            tools.play(parr[i]);
            System.out.println("------------------");
        }
    }
}
